package com.supermap.dataservice.cloud.agrinfo.crop;

import com.supermap.dataservice.util.JSONUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author aqua
 * @description 作物品种
 * @date 2018年11月08 下午 4:36
 * @email 1301584033@qq.com
 */
@Mapper
public interface CropMapper {
    /**
     * 获取所有品种列表
     * */
    @Select("select id as codeId,name as codeName from t_crop where level=1")
    List<Map<String,Object>> getListCrop();

    /**
     * 获取所有品种下面的种类列表
     * */
    @Select("select id as codeId,name as codeName  from t_crop t where t.parentid=#{codeId}")
    List<Map<String,Object>> getListCropChildNode(@Param("codeId")String codeId);


}
